cmake_minimum_required(VERSION 3.1.0)
project(RealsenseExamplesHelloRealSense)


# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# View the makefile commands during build
#set(CMAKE_VERBOSE_MAKEFILE on)

if(BUILD_GRAPHICAL_EXAMPLES)
    include(${CMAKE_SOURCE_DIR}/CMake/opengl_config.cmake)
else()
    if(ANDROID_NDK_TOOLCHAIN_INCLUDED)
        find_library(log-lib log)
        set(DEPENDENCIES realsense2 log)
    else()
        set(DEPENDENCIES realsense2)
    endif()
endif()
cmake_minimum_required(VERSION 3.1.0)


add_executable(rs-hello-realsense rs-hello-realsense.cpp)

set_property(TARGET rs-hello-realsense PROPERTY CXX_STANDARD 11)

target_link_libraries(rs-hello-realsense ${DEPENDENCIES})

set_target_properties (rs-hello-realsense PROPERTIES FOLDER "Examples")

find_package(OpenCV REQUIRED)

INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR})

LINK_LIBRARIES(${OpenCV_LIBRARY_DIR})

target_link_libraries(rs-hello-realsense ${OpenCV_LIBS})

